package com.service.order.feign.impl;
import java.math.BigDecimal;

import com.service.order.feign.ProductFeignClient;
import com.service.product.Product;
import org.springframework.stereotype.Component;

@Component
public class ProductFeignClientImpl implements ProductFeignClient {

    /**
     * 作为feign被sentinel限制后的兜底回调
     * @return
     */
    @Override
    public Product createProductFeign() {
        Product product = new Product();
        product.setId(0L);
        product.setPrice(new BigDecimal("-1"));
        product.setProductName("feign兜底回调");
        product.setNum(0);

        return product;
    }
}
